/* 
** The Header Media Queries **
** Tweak as per your needs **
*/

$small: 800px;
$medium: 940px;

.brand {
  font-weight: bold;
  font-size: 27px;
}

.site-header__top {
  background-color: #def7ff;

  ul {
    display: flex;
  }

  li:not(:last-child) {
    margin-right: 1.5rem;
  }

  .site-header__start {
    display: none;
  }
}

.site-header__bottom {
  position: relative;
  background-color: #c7f2ff;

  .site-header__end {
    @media (max-width: $medium - 1) {
      order: -1;
    }
  }
}

.site-header__wrapper {
  display: flex;
  justify-content: space-between;
}

.site-header__wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;

  @media (min-width: $medium) {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

.site-header__end {
  display: flex;
  align-items: center;
}

.site-header__end.top {
  > * + * {
    margin-left: 1.5rem;
  }
}

.site-header__end.bottom {
  > *:not(:last-child) {
    @media (min-width: $medium) {
      margin-right: 1.5rem;
      //outline: solid 1px;
    }
  }

  .cart {
    @media (max-width: $medium - 1) {
      margin-right: 1.5rem;
      //outline: solid 1px;
    }
  }

  @media (max-width: $medium - 1) {
    .search {
      margin-left: 0;
    }
  }

  svg {
    width: 22px;
    height: 22px;
  }
}

.nav__wrapper {
  @media (min-width: $medium) {
    display: flex;
  }

  @media (max-width: $medium - 1) {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: -1;
    background-color: #d9f0f7;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;

    &.active {
      visibility: visible;
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.nav__item {
  &:not(:last-child) {
    margin-right: 1.5rem;
  }

  a {
    display: block;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;

    @media (max-width: $medium - 1) {
      padding: 1rem;
    }
  }

  svg {
    display: inline-block;
    vertical-align: middle;
    width: 28px;
    height: 28px;
    margin-right: 1rem;

    @media (min-width: $medium) {
      display: block;
      margin: 0 auto 0.5rem;
    }
  }

  &.active {
    a {
      border-left-color: #222;

      @media (min-width: $small) {
        border-bottom-color: #222;
      }
    }
  }
}

.nav__toggle {
  position: absolute;
  right: 1rem;
  top: 1rem;

  @media (min-width: $medium) {
    display: none;
  }
}

.search {
  display: flex;
}

.search__toggle {
  appearance: none;
  order: 1;
  font-size: 0;
  width: 34px;
  height: 34px;
  background: url("../img/header-3/search.svg") center/22px no-repeat;
  border: 0;

  @media (max-width: $medium - 1) {
    position: absolute;
    right: 5.5rem;
    top: 0.65rem;
  }

  &.active {
    background: url("../img/header-5/close.svg") center/22px no-repeat;
  }
}

.search__form {
  display: none;

  &.active {
    display: block;
  }

  @media (max-width: $small - 1) {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: red;

    input {
      width: 100%;
    }
  }

  input {
    min-width: 200px;
    appearance: none;
    border: 0;
    background-color: #fff;
    border-radius: 0;
    font-size: 16px;
    padding: 0.5rem;

    @media (max-width: $small - 1) {
      border-bottom: 1px solid #979797;
    }
  }
}
